package com.wnxy.gym.vevue.core.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wnxy.gym.vevue.core.entity.Stadium;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jack
 * @since 2022-06-14
 */
@Mapper
public interface StadiumMapper extends BaseMapper<Stadium> {
    @Select("SELECT\n" +
            "  place_id AS placeId,\n" +
            "  place_name AS placeName,\n" +
            "  place_address AS placeAddress,\n" +
            "  place_phone AS placePhone,\n" +
            "  place_type AS placeType\n" +
            "FROM\n" +
            "  `stadium`")
    List<Stadium> getEntity();

    IPage<List<Stadium>> getinfo(IPage page,
                           @Param("placeId") Long placeId,
                           @Param("placeName") String placeName);

}
